package com.faasadmin.faas.modules.admin.admin.controller.system.appmarket.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import static com.faasadmin.framework.common.utils.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import static com.faasadmin.framework.common.utils.DateUtils.TIME_ZONE_DEFAULT;

/**
 * @author: faasadmin
 * @description: 应用市场响应
 * @data: 2022-10-11 15:41
 **/
@Tag(name = "应用市场 Response VO")
@Data
@ToString(callSuper = true)
public class SysAppMarketPageRespVO {

    @Schema(description = "名称")
    @NotNull(message = "名称不能为空")
    private String name;

    @Schema(description = "缩率图")
    @NotNull(message = "缩率图不能为空")
    private String thumbnail;

    @Schema(description = "logo")
    private String logo;

    @Schema(description = "是否显示")
    @NotNull(message = "是否显示不能为空")
    private Integer visible;

    @Schema(description = "售价")
    private BigDecimal price;

    @Schema(description = "应用编码")
    private String appCode;

    @NotNull(message = "应用简称不能为空")
    @Schema(description = "应用简称")
    private String appShort;

    @Schema(description = "安装数量")
    private Integer install;

    @Schema(description = "付费安装")
    private Integer paidInstall;

    @Schema(description = "适用平台")
    @NotNull(message = "适用平台不能为空")
    private List<String> platform;

    @Schema(description = "浏览量")
    private Integer browse;

    @Schema(description = "是否加密")
    @NotNull(message = "是否加密不能为空")
    private String encrypt;

    @Schema(description = "隐私信息获取")
    private String secrecy;

    @Schema(description = "租户ID")
    private Long lesseeId;

    @Schema(description = "状态")
    private Integer status;


    @Schema(description = "应用分类")
    private Integer categoryId;


    @Schema(description = "主键")
    private Long id;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    private Date createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
    private Date updateTime;

    @Schema(description = "最新版本")
    private String latestSn;
}
